import type { InjectionKey } from "vue";
import type { SwipeActionProps, SwipeActionItemProps } from "../config";

export interface SwipeActionContext {
	props:Required<SwipeActionProps>
	addField: (field: SwipeActionItemContext) => void
	removeField: (field: SwipeActionItemContext) => void
	closeOther: (child: SwipeActionItemContext) => void
}

export interface SwipeActionItemContext {
	props:SwipeActionItemProps
	closeHandler:()=> void
}

export const swipeActionItemContextKey: InjectionKey<SwipeActionItemContext> = Symbol(
	"ESwipeActionItemContextKey"
);

export const swipeActionContextKey: InjectionKey<SwipeActionContext> =
	Symbol("ESwipeActionContextKey");
